<?php html::docType() ?>
<html>
<head>
	<?php html::head() ?>
	<link href="../css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="container">
		<?php html::navBar2() ?>
		<?php html::flash() ?>
		<div id="content">	 
			<div class="section" id="beer-view-main">
				<div class="section-title">
					<h1 class="page-name">Beers &#62; Add new</h1>
				</div>
				<div style="padding: 20px;">
				<form action="router.php" method="POST">
					<table border="0">
						<tr>
							<td align="right"><b>Name</b></td>
							<td><input type="text" name="name"/></td>
						</tr>
						<tr>
							<td align="right"><b>Type</b></td>
							<td><select name="beer_types_id">
								<?php foreach($view->beerTypes as $type){ 
									echo "<option value=$type[id]>$type[type]</option>";
								}?>	
								</select>
							</td>
						</tr>
						<tr>
							<td align="right"><b>Brewery</b></td>
							<td><select name="brewery_id">
								<?php foreach($view->breweries as $brewery){ 
									echo "<option value=$brewery[id]>$brewery[name]</option>";
								}?>	
								</select>	
							</td>
						</tr>
						<tr>
							<td></td>
							<td><input type="submit" class="button" value="Add" /></td>
						</tr>
					</table>
					<input type="hidden" name="c" value="beer" />
					<input type="hidden" name="a" value="create" />
				</form>
				</div>
			</div>
		</div>
		<?php html::footer2()?>
	</div>
</body>
</html>
